<?php
include_once("./_common.php");

//
$in_num = $in_num1."-".$in_num2;
$in_hp = $in_hp1."-".$in_hp2."-".$in_hp3;
$in_day1 = date("Y")."년 ".date("m")."월 ".date("d")."일";


//사인이미지 처리
if ($in_sign_img2 == "") {
	$signCfrm = "";
}
else {
	$signCfrm = "in_sign_img2 = '$in_sign_img2',";
}


//
$string = "in_name = '$in_name',
	in_num = '$in_num',
	in_addr = '$in_addr',
	in_hp = '$in_hp',
	in_day1 = '$in_day1',
	in_day2_y = '$in_day2_y',
	in_day2_m = '$in_day2_m',
	in_day2_d = '$in_day2_d',
	in_sign_txt1 = '$in_sign_txt1',
	in_sign_txt2 = '$in_sign_txt2',
	$signCfrm
	in_sign_img1 = '$in_sign_img1'";

if ($w == "")
{
	$sql = "INSERT
			INTO info_form
			SET $string";
	$rst = sql_query($sql);
}
else if ($w == "u")
{
	$sql = "UPDATE info_form
			SET $string
			WHERE id = '$id'";
	$rst = sql_query($sql);
}
else if ($w == "d")
{
	$sql = "DELETE
			FROM info_form
			WHERE id = '$id'";
	$rst = sql_query($sql);
}


if ($g4[https_url])
    $https_url = "$g4[url]/adm/adm_new";
else
    $https_url = ".";

if ($file_upload_msg)
    alert($file_upload_msg, "{$https_url}/info_list.php?bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr);
else
    goto_url("{$https_url}/info_list.php?bo_table=$bo_table&wr_id=$wr_id&page=$page" . $qstr);

?>
